package server.deploy;

import java.util.HashMap;
import java.util.Map;
/*
定义一个过滤器所需的信息
*/
/*
2023/2/26 该类内容全部写完,后续直接使用,无需修改
by cyl
 */
public final class FilterDef {
    //过滤器的描述
    private String description = null;
    //过滤器的显示名称
    private String displayName = null;
    //过滤器类的全类名
    private String filterClass = null;
    //过滤器名称
    private String filterName = null;
    //大图标?
    private String largeIcon = null;
    //小图标?
    private String smallIcon = null;
    //初始化参数
    private Map<String, String> parameters = new HashMap<>();

    public void addInitParameter(String name, String value) {
        parameters.put(name, value);
    }

    public String toString() {
        StringBuffer sb = new StringBuffer("FilterDef[");
        sb.append("filterName=");
        sb.append(this.filterName);
        sb.append(", filterClass=");
        sb.append(this.filterClass);
        sb.append("]");
        return (sb.toString());
    }

    //getter----------------------------------------------------------------------------------
    public String getDescription() {
        return description;
    }

    public String getDisplayName() {
        return displayName;
    }

    public String getFilterClass() {
        return filterClass;
    }

    public String getFilterName() {
        return filterName;
    }

    public String getLargeIcon() {
        return largeIcon;
    }

    public Map<String, String> getParameterMap() {
        return parameters;
    }

    public String getSmallIcon() {
        return smallIcon;
    }

    //setter----------------------------------------------------------------------------------

    public void setDescription(String description) {
        this.description = description;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public void setFilterClass(String filterClass) {
        this.filterClass = filterClass;
    }

    public void setFilterName(String filterName) {
        this.filterName = filterName;
    }

    public void setLargeIcon(String largeIcon) {
        this.largeIcon = largeIcon;
    }

    public void setSmallIcon(String smallIcon) {
        this.smallIcon = smallIcon;
    }
}
